<?php
/**
 * @var $this Pinenut\Action
 * @var $groupId string
 * @var $companionProfileId string
 * @var $companionProfileIsService bool
 * @var $beforeTimestamp string
 * @var $myProfileId string
 */
?>
<div class="md-messages-block">
	<?php echo $this->action(
		'.listbody',
		[
			'groupId' => $groupId,
			'companionProfileId' => $companionProfileId,
			'beforeTimestamp' => $beforeTimestamp,
			'myProfileId' => $myProfileId,
		]
	); ?>

	<?php echo $this->action('.setAllAsRead', ['groupId' => $groupId]); ?>

	<?php if (!$companionProfileIsService) : ?>
		<?php echo $this->action(
			'.readStatus', [
				'targetProfileId' => $companionProfileId,
			]); ?>
	<?php endif; ?>
</div>
